package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class CollectTableDef extends TableDef {

    /**
     * 收藏表 实体类。

 @author 27806
 @since 2024-06-15
     */
    public static final CollectTableDef COLLECT = new CollectTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    /**
     * 名字下方提示
     */
    public final QueryColumn TIPS = new QueryColumn(this, "tips");

    /**
     * 收藏类型
     */
    public final QueryColumn TYPE = new QueryColumn(this, "type");

    /**
     * 顾客id
     */
    public final QueryColumn CON_ID = new QueryColumn(this, "con_id");

    /**
     * 封面
     */
    public final QueryColumn COVER = new QueryColumn(this, "cover");

    /**
     * 标题
     */
    public final QueryColumn TITLE = new QueryColumn(this, "title");

    /**
     * 对应表id
     */
    public final QueryColumn ITEM_ID = new QueryColumn(this, "item_id");

    /**
     * 收藏时间
     */
    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 简介
     */
    public final QueryColumn DESCRIPTION = new QueryColumn(this, "description");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TIPS, TYPE, CON_ID, COVER, TITLE, ITEM_ID, CREATE_TIME, DESCRIPTION};

    public CollectTableDef() {
        super("rc", "collect");
    }

    private CollectTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public CollectTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new CollectTableDef("rc", "collect", alias));
    }

}
